package Mydxc.cmo;

public class Xfz implements Runnable
{
	private Ck stor;
	@Override
	public void run()
	{
		while(true)
		{
			try
			{
				Thread.sleep(500);
			} catch (InterruptedException e)
			{
				e.printStackTrace();
			}
			/*锁的对象
			 * 得确保所有的服务员都使用一个出菜口
			 * */
			synchronized(stor)
			{
				/*服务员端菜*/
				this.stor.rove();
			}
		}
	}
	public void setCk(Ck stor)
	{
		this.stor=stor;
	}
}
